package json.org.noahx.javavsjson;

import org.apache.commons.lang3.SerializationUtils;

import java.io.Serializable;
import java.util.Map;

/**
 * Created with IntelliJ IDEA.
 * User: noah
 * Date: 3/9/13
 * Time: 2:24 AM
 * To change this template use File | Settings | File Templates.
 */
public class CommonLang3SerializationTest implements SerializationTest {
    @Override
    public String getTestName() {
        return "Commons Lang3";
    }

    @Override
    public Map<String, Object> testBytes2Map(byte[] bytes) {
        return (Map<String, Object>) SerializationUtils.deserialize(bytes);
    }

    @Override
    public byte[] testMap2Bytes(Map<String, Object> map) {
        return SerializationUtils.serialize((Serializable) map);
    }
}
